home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / milstd / ms12.sty < prev   
Text File  |  1991-08-08  |  16KB  |  364 lines

  1. % MIL-STD DOCUMENT STYLE -- for LaTeX version 2.08
  2.  
  3. %  ****************************************
  4. %  *               FONTS                  *
  5. %  ****************************************
  6. %
  7.  
  8. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  9. \normallineskip 1pt
  10. \def\baselinestretch{1}
  11.  
  12. % Each size-changing command \SIZE executes the command
  13. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  14. % where:
  15. %   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual
  16. %                  value will be \baselinestretch * BASELINESKIP.)
  17. %
  18. %  \FONTSIZE     = Name of font-size command.  The currently available
  19. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  20. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  21. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  22. %  \@FONTSIZE    = The same as the font-size command except with an
  23. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  24. %                  \@FONTSIZE = \@xivpt.
  25. %
  26. % For reasons of efficiency that needn't concern the designer,
  27. % the document style defines \@normalsize instead of \normalsize .  This is
  28. % done only for \normalsize, not for any other size-changing commands.
  29.  
  30. \def\@normalsize{\@setsize\normalsize{15pt}\xiipt\@xiipt
  31. \abovedisplayskip 12pt plus3pt minus7pt%
  32. \belowdisplayskip \abovedisplayskip
  33. \abovedisplayshortskip  \z@ plus3pt%
  34. \belowdisplayshortskip  6.5pt plus3.5pt minus3pt}
  35.  
  36. \def\small{\@setsize\small{13.6pt}\xipt\@xipt
  37. \abovedisplayskip 11pt plus3pt minus6pt%
  38. \belowdisplayskip \abovedisplayskip
  39. \abovedisplayshortskip  \z@ plus3pt%
  40. \belowdisplayshortskip  6.5pt plus3.5pt minus3pt
  41. \def\@listi{\parsep 4.5pt plus 2pt minus 1pt
  42.             \itemsep \parsep
  43.             \topsep 9pt plus 3pt minus 5pt}}
  44.  
  45. \def\footnotesize{\@setsize\footnotesize{12pt}\xpt\@xpt
  46. \abovedisplayskip 10pt plus2pt minus5pt%
  47. \belowdisplayskip \abovedisplayskip
  48. \abovedisplayshortskip  \z@ plus3pt%
  49. \belowdisplayshortskip  6pt plus3pt minus3pt
  50. \def\@listi{\topsep 6pt plus 2pt minus 2pt\parsep 3pt plus 2pt minus 1pt
  51. \itemsep \parsep}}
  52.  
  53. \def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
  54. \def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
  55. \def\large{\@setsize\large{18pt}\xivpt\@xivpt}
  56. \def\Large{\@setsize\Large{22pt}\xviipt\@xviipt}
  57. \def\LARGE{\@setsize\LARGE{25pt}\xxpt\@xxpt}
  58. \def\huge{\@setsize\huge{30pt}\xxvpt\@xxvpt}
  59. \let\Huge=\huge
  60.  
  61. \normalsize  % Choose the normalsize font.
  62.  
  63.  
  64. %  ****************************************
  65. %  *            PAGE LAYOUT               *
  66. %  ****************************************
  67. %
  68. % All margin dimensions measured from a point one inch from top and side
  69. % of page.  Dimensions shrink by about 2 percent
  70.  
  71. % SIDE MARGINS:
  72. \if@twoside                 % Values for two-sided printing:
  73.    \oddsidemargin 21pt      %   Left margin on odd-numbered pages.
  74.    \evensidemargin 59pt     %   Left margin on even-numbered pages.
  75.    \marginparwidth 85pt    %   Width of marginal notes.
  76. \else                       % Values for one-sided printing:
  77.    \oddsidemargin 0pt       %   Note that \oddsidemargin = \evensidemargin
  78.    \evensidemargin 0pt
  79.    \marginparwidth 68pt
  80. \fi
  81. \marginparsep 10pt          % Horizontal space between outer margin and
  82.                             % marginal note
  83.  
  84.  
  85. % VERTICAL SPACING:
  86.                          % Top of page:
  87. \topmargin -35pt         %    Nominal distance from top of page to top of
  88.                          %    box containing running head.
  89. \headheight 24pt         %    Height of box containing running head.
  90. \headsep 25pt            %    Space between running head and text.
  91. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  92.                          % Bottom of page:
  93. \footheight 12pt         %    Height of box containing running foot.
  94. \footskip 30pt           %    Distance from baseline of box containing foot
  95.                          %    to baseline of last line of text.
  96.  
  97.  
  98. % DIMENSION OF TEXT:
  99.  
  100. \textheight 8.33in       % Height of text (including footnotes and figures,
  101.                          % excluding running head and foot).
  102. \textwidth 6.25in        % Width of text line.
  103.                          % For two-column mode:
  104. \columnsep 10pt          %    Space between columns
  105. \columnseprule 0pt       %    Width of rule between columns.
  106.  
  107. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  108. % natural height instead of being stretched to exactly \textheight.
  109.  
  110. % FOOTNOTES:
  111.  
  112. \footnotesep 14pt    % Height of strut placed at the beginning of every
  113.                      % footnote.
  114. \skip\footins 8pt plus 2pt minus 4pt  % Space between last line of text and
  115.                                       % top of first footnote.
  116.  
  117. % FLOATS: (a float is something like a figure or table)
  118. %
  119. %  FOR FLOATS ON A TEXT PAGE:
  120. %
  121. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  122. \floatsep 14pt plus 2pt minus 4pt        % Space between adjacent floats moved
  123.                                          % to top or bottom of text page.
  124. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and floats
  125.                                          % at top or bottom of page.
  126. \intextsep 14pt plus 4pt minus 4pt       % Space between in-text figures and
  127.                                          % text.
  128. \@maxsep 20pt                            % The maximum of \floatsep,
  129.                                          % \textfloatsep and \intextsep (minus
  130.                                          % the stretch and shrink).
  131. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  132. \dblfloatsep 14pt plus 2pt minus 4pt     % Same as \floatsep for double-column
  133.                                          % figures in two-column mode.
  134. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for double-column
  135.                                          % floats.
  136. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep and
  137.                                          % \dbltexfloatsep.
  138.  
  139. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  140. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  141. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be
  142.                          % 0pt plus ...)
  143. \@fpsep 10pt plus 2fil    % Space between floats on float page/column.
  144. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be
  145.                          % 0pt plus ... )
  146.  
  147. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  148. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  149. \@dblfpsep 10pt plus 2fil % Space between floats on float page.
  150. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be
  151.                          % 0pt plus ... )
  152. % MARGINAL NOTES:
  153. %
  154. \marginparpush 7pt       % Minimum vertical separation between two marginal
  155.                          % notes.
  156.  
  157.  
  158. %  ****************************************
  159. %  *           PARAGRAPHING               *
  160. %  ****************************************
  161. %
  162. \parskip 12pt plus 1pt             % Extra vertical space between paragraphs.
  163. \parindent 1.5em                   % Width of paragraph indentation.
  164. \topsep 10pt plus 4pt minus 6pt    % Extra vertical space, in addition to
  165.                                    % \parskip, added above and below list and
  166.                                    % paragraphing environments.
  167. \partopsep 3pt plus 2pt minus 2pt  % Extra vertical space, in addition to
  168.                                    % \parskip and \topsep, added when user
  169.                                    % leaves blank line before environment.
  170. \itemsep 5pt plus 2.5pt minus 1pt  % Extra vertical space, in addition to
  171.                                    % \parskip, added between list items.
  172.  
  173. % The following page-breaking penalties are defined
  174.  
  175. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  176. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  177. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  178.  
  179. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph environment.
  180. \@endparpenalty   -\@lowpenalty    % After a list or paragraph environment.
  181. \@itempenalty     -\@lowpenalty    % Between list items.
  182.  
  183. % \clubpenalty         % 'Club line'  at bottom of page.
  184. % \widowpenalty        % 'Widow line' at top of page.
  185. % \displaywidowpenalty % Math display widow line.
  186. % \predisplaypenalty   % Breaking before a math display.
  187. % \postdisplaypenalty  % Breaking after a math display.
  188. % \interlinepenalty    % Breaking at a line within a paragraph.
  189. % \brokenpenalty       % Breaking after a hyphenated line.
  190.  
  191.  
  192. %    ****************************************
  193. %    *             SECTIONS                 *
  194. %    ****************************************
  195. %
  196.  
  197. % \secdef{UNSTARCMDS}{STARCMDS} :
  198. %    When defining a sectionioning command without using
  199. %    \@startsection, you can use \secdef as follows:
  200. %       \def\part { ... \secdef \CMDA \CMDB }
  201. %       \def\CMDA  [#1]#2{ ... }     % Command to define \part[...]{...}
  202. %       \def\CMDB  #1{ ... }         % Command to define \part*{...}
  203.  
  204. \def\part{\par               % New paragraph
  205.    \addvspace{4ex}           % Adds vertical space above title.
  206.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  207.    \secdef\@part\@spart}     % to \@afterindenttrue to have indent.
  208.  
  209. \def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne    % IF secnumdepth > -1
  210.         \refstepcounter{part}                    %  THEN step part counter
  211.         \addcontentsline{toc}{part}{\thepart     %       add toc line
  212.         \hspace{1em}#1}\else                     %  ELSE add unnumbered line
  213.       \addcontentsline{toc}{part}{#1}\fi         % FI
  214.    { \parindent 0pt \raggedright
  215.     \ifnum \c@secnumdepth >\m@ne   % IF secnumdepth > -1
  216.       \Large \bf Part \thepart     %   THEN Print 'Part' and
  217.       \par\nobreak                 %          number in \Large boldface.
  218.     \fi                            % FI
  219.     \huge \bf                      % Select \huge boldface.
  220.     #2\markboth{}{}\par }          % Print title and set heading marks null.
  221.     \nobreak                       % TeX penalty to prevent page break.
  222.     \vskip 3ex                     % Space between title and text.
  223.    \@afterheading                  % Routine called after part and
  224.     }                              %     section heading.
  225.  
  226. % Heading for \part* command
  227. \def\@spart#1{{\parindent 0pt \raggedright
  228.     \huge \bf
  229.     #1\par}                         % Title.
  230.     \nobreak                        % TeX penalty to prevent page break.
  231.     \vskip 3ex                      % Space between title and text.
  232.     \@afterheading                  % Routine called after part and
  233.   }                                 %     section heading.
  234.  
  235. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
  236. %            optional * [ALTHEADING]{HEADING}
  237. %    Generic command to start a section.
  238. %    NAME       : e.g., 'subsection'
  239. %    LEVEL      : a number, denoting depth of section -- e.g., section=1,
  240. %                 subsection = 2, etc.  A section number will be printed if
  241. %                 and only if LEVEL < or = the value of the secnumdepth
  242. %                 counter.
  243. %    INDENT     : Indentation of heading from left margin
  244. %    BEFORESKIP : Absolute value = skip to leave above the heading.
  245. %                 If negative, then paragraph indent of text following
  246. %                 heading is suppressed.
  247. %    AFTERSKIP  : if positive, then skip to leave below heading,
  248. %                       else - skip to leave to right of run-in heading.
  249. %    STYLE      : commands to set style
  250. %  If '*' missing, then increments the counter.  If it is present, then
  251. %  there should be no [ALTHEADING] argument.  A sectioning command
  252. %  is normally defined to \@startsection + its first six arguments.
  253.  
  254. \def\section{\clearpage \@startsection {section}{1}{\parindent}
  255.     {3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}{\sectionstyle}}
  256. \def\subsection{\@startsection{subsection}{2}{\parindent}
  257.     {3.25ex plus 1ex minus .2ex}{-1.5ex plus .2ex}{\subsectionstyle}}
  258. \def\subsubsection{\@startsection{subsubsection}{3}{\parindent}
  259.     {3.25ex plus 1ex minus .2ex}{-1.5ex plus -.2ex}{\subsubsectionstyle}}
  260. \def\paragraph{\@startsection {paragraph}{4}{\parindent}
  261.     {3.25ex plus 1ex minus .2ex}{-1em}{\paragraphstyle}}
  262. \def\subparagraph{\@startsection {subparagraph}{5}{\parindent}
  263.     {3.25ex plus 1ex minus .2ex}{-1em}{\subparagraphstyle}}
  264. \def\subsubparagraph{\@startsection {subsubparagraph}{6}{\parindent}
  265.     {3.25ex plus 1ex minus .2ex}{-1em}{\subsubparagraphstyle}}
  266. \def\subsubsubparagraph{\@startsection {subsubsubparagraph}{7}{\parindent}
  267.     {3.25ex plus 1ex minus .2ex}{-1em}{\subsubsubparagraphstyle}}
  268.  
  269. % The value of the counter secnumdepth gives the depth of the
  270. % highest-level sectioning command that is to produce section numbers.
  271. %
  272.  
  273. \setcounter{secnumdepth}{7}
  274.  
  275. % APPENDIX
  276. %
  277. % The \appendix command must do the following:
  278. %    -- reset the section counter to zero and 
  279. %    -- reset the subsection counter to zero
  280. %    -- redefine the \section command to produce the proper format appendix 
  281.  
  282. \def\appendix{\par
  283.   \clearpage
  284.   \renewcommand{\thepage}{\Roman{appnumber}-\arabic{page}}
  285.   \setcounter{appnumber}{0}
  286.   \setcounter{section}{0}
  287.   \setcounter{subsection}{0}
  288.   \makeatletter
  289.     \def\section{\clearpage \addtocounter{section}{9}
  290.       \addtocounter{appnumber}{1} \setcounter{page}{1}
  291.       \addtocontents{toc}{\noindent\hspace{7em}APPENDIX~\Roman{appnumber}}
  292.       \setcounter{figure}{0}
  293.       \setcounter{table}{0}
  294.        \begin{center} 
  295.      \large\bf 
  296.      APPENDIX~\Roman{appnumber}
  297.        \end{center} 
  298.        \par 
  299.        \@startsection {section}{1}{\parindent}{3.5ex plus 1ex minus
  300.        .2ex}{2.3ex plus .2ex}{\sectionstyle}}
  301.   \makeatother
  302.   \def\thefigure{\Roman{appnumber}-\arabic{figure}}
  303.   \def\thetable{\Roman{appnumber}-\Roman{table}}
  304. }
  305.  
  306. %    ****************************************
  307. %    *                LISTS                 *
  308. %    ****************************************
  309. %
  310.  
  311. % The following commands are used to set the default values for the list
  312. % environment's parameters. See the LaTeX manual for an explanation of
  313. % the meanings of the parameters.  Defaults for the list environment are
  314. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  315. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  316. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  317. % called for a third-level list.)  By convention, \@listK should set
  318. % \leftmargin to \leftmarginK.
  319. %
  320. % For efficiency, level-one list's values are defined at top level, and
  321. % \@listi is defined to set only \leftmargin.
  322.  
  323. \leftmargini 4.5em
  324. \leftmarginii 2.2em     % > \labelsep + width of '(m)'
  325. \leftmarginiii 1.87em   % > \labelsep + width of 'vii.'
  326. \leftmarginiv 1.7em     % > \labelsep + width of 'M.'
  327. \leftmarginv 1em
  328. \leftmarginvi 1em
  329.  
  330. \leftmargin\leftmargini
  331. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  332. \labelsep .5em
  333. \parsep 5pt plus 2.5pt minus 1pt
  334.  
  335. \def\@listi{\leftmargin\leftmargini}
  336.  
  337. \def\@listii{\leftmargin\leftmarginii
  338.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  339.    \topsep 5pt plus 2.5pt minus 1pt
  340.    \parsep 2.5pt plus 1pt minus 1pt
  341.    \itemsep \parsep}
  342.  
  343. \def\@listiii{\leftmargin\leftmarginiii
  344.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  345.     \topsep 2.5pt plus 1pt minus 1pt
  346.     \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  347.     \itemsep \topsep}
  348.  
  349. \def\@listiv{\leftmargin\leftmarginiv
  350.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  351.  
  352. \def\@listv{\leftmargin\leftmarginv
  353.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  354.  
  355. \def\@listvi{\leftmargin\leftmarginvi
  356.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  357. %     DEC/CMS REPLACEMENT HISTORY, Element MS12.STY
  358. %     *5    27-FEB-1986 14:31:28 MCPHERSON "Redefine \thepage for appendices, capitalize appendix"
  359. %     *4    13-FEB-1986 13:22:54 MCPHERSON "Reset the figure and table counters for each appendix"
  360. %     *3     7-FEB-1986 10:10:31 MCPHERSON "deleted bookform, added volumes, renumbered appendices"
  361. %     *2    13-JAN-1986 09:02:27 MCPHERSON "Increase \parskip, increase indentation on lists "
  362. %     *1     6-NOV-1985 15:11:34 MCPHERSON "MIL-STD-490 document style, LaTeX 2.08"
  363. %     DEC/CMS REPLACEMENT HISTORY, Element MS12.STY
  364.